<!--学生端我的实习记录-->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>我的实习记录列表页</title>
		<script src="../../script/mui.min.js"></script>
		<link rel="stylesheet" type="text/css" href="../../css/mui.min.css">
		<link rel="stylesheet" href="../../css/CFNetPP_Base.css">
		<link rel="stylesheet" type="text/css" href="../../css/base.css"/>
		<script type="text/javascript" src="../../script/echarts.min.js"></script>
		<script src="../../script/jquery.min.js" type="text/javascript"></script>
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
	</head>
	<body>
		<div class="contactList " id="contactList">
			<ul id="list_id" class="mui-table-view " >
			<!--	<li class="mui-table-view-cell mui-media list_month">
					<div class="mui-media-body">
						<p class="font16 base_dark_grey">
							2015年7月~2015年8月
						</p>
						<div class="mui-ellipsis    width73 completion top_5">
							<p class="base_grey mui-pull-left font11">
								石家庄安得物流ssssssssssssss
							</p>
							<p class="base_grey mui-pull-right  font13">
								创出省市经理
							</p>
						</div>
					</div>
					<span class="practicebtn0 btnpos1 " >未实习</span>
				</li>
				<li class="mui-table-view-cell mui-media list_month">
					<div class="mui-media-body">
						<p class="font16 base_dark_grey">
							2015年7月~2015年8月
						</p>
						<div class="mui-ellipsis    width73 completion top_5">
							<p class="base_grey mui-pull-left font11">
								石家庄安得物流ssssssssssssss
							</p>
							<p class="base_grey mui-pull-right  font13">
								创出省市经理
							</p>
						</div>
					</div>
					<span class="practicebtn1 btnpos1 " >实习中</span>
				</li>
				<li class="mui-table-view-cell mui-media list_month">
					<div class="mui-media-body">
						<p class="font16 base_dark_grey">
							2015年7月~2015年8月
						</p>
						<div class="mui-ellipsis    width73 completion top_5">
							<p class="base_grey mui-pull-left font11">
								石家庄安得物流ssssssssssssss
							</p>
							<p class="base_grey mui-pull-right  font13">
								创出省市经理
							</p>
						</div>
					</div>
					<span class="practicebtn2 btnpos1 " >实习结束</span>
				</li>
				<li class="mui-table-view-cell mui-media list_month">
					<div class="mui-media-body">
						<p class="font16 base_dark_grey">
							2015年7月~2015年8月
						</p>
						<div class="mui-ellipsis    width73 completion top_5">
							<p class="base_grey mui-pull-left font11">
								石家庄安得物流ssssssssssssss
							</p>
							<p class="base_grey mui-pull-right  font13">
								创出省市经理
							</p>
						</div>
					</div>
					<span class="practicebtn3 btnpos1 " >合格</span>
				</li>
				<li class="mui-table-view-cell mui-media list_month">
					<div class="mui-media-body">
						<p class="font16 base_dark_grey">
							2015年7月~2015年8月
						</p>
						<div class="mui-ellipsis    width73 completion top_5">
							<p class="base_grey mui-pull-left font11">
								石家庄安得物流ssssssssssssss
							</p>
							<p class="base_grey mui-pull-right  font13">
								创出省市经理
							</p>
						</div>
					</div>
					<span class="practicebtn4 btnpos1 " >良好</span>
				</li>
				<li class="mui-table-view-cell mui-media list_month">
					<div class="mui-media-body">
						<p class="font16 base_dark_grey">
							2015年7月~2015年8月
						</p>
						<div class="mui-ellipsis    width73 completion top_5">
							<p class="base_grey mui-pull-left font11">
								石家庄安得物流ssssssssssssss
							</p>
							<p class="base_grey mui-pull-right  font13">
								创出省市经理
							</p>
						</div>
					</div>
					<span class="practicebtn5 btnpos1 " >优秀</span>
				</li>
				<li class="mui-table-view-cell mui-media list_month">
					<div class="mui-media-body">
						<p class="font16 base_dark_grey">
							2015年7月~2015年8月
						</p>
						<div class="mui-ellipsis    width73 completion top_5">
							<p class="base_grey mui-pull-left font11">
								石家庄安得物流ssssssssssssss
							</p>
							<p class="base_grey mui-pull-right  font13">
								创出省市经理
							</p>
						</div>
					</div>
					<span class="practicebtn6 btnpos1 " >未结业</span>
				</li>-->
			</ul>
			<div class="noSign" hidden="hidden" id="noData">
				<img src="../../image/icon_img.png" width="60%">
				<p class="font16 top_15 base_dark_grey" >
					暂无数据
				</p>
			</div>
			<div class="loadFailure" hidden="hidden" id="noNet">
				<img src="../../image/icon_img01.png" width="60%">
				<p class="" >
					数据加载失败
				</p>
				<p>
					请检查您的网络
				</p>
				<button type="button" class="mui-btn mui-btn-outlined" onclick="RefreshData()">
					重新加载
				</button>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script src="../../script/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script type="text/javascript">
		var refreshCount = 0;
		//更新数据条数
		var dataArr = new Array();
		var page = 1;
		var row = 10;
		//		var TestUrl='http://192.168.100.107/api/notes/lst';
		apiready = function() {
			//		alert('teddd');
			showProgress();
			loadNewData();
			setRefreshHeader();
			setPullUpRefresh();
		}
		function RefreshData() {
			$('#noNet').hide();
			showProgress();
			loadNewData();
		}

		//从网路获取数据
		function loadData() {
			var param = {
				uid : $api.getStorage('cfnetppuid'),
				//          uid:'53072',
				jid : $api.getStorage('cfnetppjid'),
//				jid : 337,
				page : page,
				rows : row,
			};
			cfnetppPOST(urlLst, param, true, function(data, status) {
							api.refreshHeaderLoadDone();
				hideProgress();
//				alert(urlLst+JSON.stringify(param)+"=="+ JSON.stringify(data));
				if (status == 'success') {
					if (data.status == 1) {
						var list = data.json;
						if (list != null && list.constructor == Array && list.length > 0) {
							$('#noData').hide();
							dataArr = list;
							refreshCount = list.length;
							htmlStringWithName(list, list.length);
						} else {
							if (page == 1) {
								$('#noData').show();
								$('#list_id').html('');
							} else {
								api.toast({
									msg : '没有更多数据了',
									duration : 2000,
									location : 'bottom'
								});
							}
						}
					} else {
						if (page == 1) {
							$('#list_id').html('');
							$('#noData').show();
						}
					}
				} else {
					$('#noNet').show();
				}
			});
		};
		//		function loadNewData() {
		//			page = 1;
		//			loadData();
		//		}
		//
		//		function loadMoreData() {
		//			page++;
		//			loadData();
		//		}
		function htmlStringWithName(list, len) {
			var strhtml = "";
			for (var i = 0; i < len; i++) {
				var data = list[i];
				var starttime = getLocalTime(data.starttime);
				var endtime = getLocalTime(data.endtime);
				var corp_name = isStringNull(data.company);
				var work_name = isStringNull(data.sxgw);
				var num = parseInt(data.type);
				//	alert(corp_name);
				var str = '<li dataid="' + i + '" class="mui-table-view-cell mui-media list_month">' + '<div class="mui-media-body">' + '<p class="font16 base_dark_grey">' + starttime + '~' + endtime + '</p>' + '<div class="mui-ellipsis   width73 completion top_5">' + '<p class="base_grey font11" >' + notTen(corp_name) + '</p>' + '<p class="base_grey mui-pull-right font13" >' + work_name + '</p>' + '</div>' + '</div>' + '<span class="practicebtn' + num + ' btnpos1">' + typeName(num) + '</span>' + '</li>';
				strhtml = strhtml + str;
			}
			if (page == 1) {
				$('#list_id').html(strhtml);
			} else {
				$('#list_id').append(strhtml);
			}
			setupTapCellClick();
		}

		//根据数字反馈学生状态
		function typeName(i) {
			switch(i) {
				case 0:
					return '顶岗实习';
					break;
				case 1:
					return '认知实习 ';
					break;
				case 2:
					return '跟岗实习';
					break;
				default:
			}
		}

		function setupTapCellClick() {
			$('.list_month').unbind('click');
			$('.list_month').click(function() {
				var dataid = $(this).attr('dataid');
				var data = dataArr[parseInt(dataid)];
				var id = parseInt(data.id);
				var type = parseInt(data.type);
				var sxid = data.sxid;
				//				alert(weeklyid);
				if (type == 1) {//认知实习
					api.openWin({useWKWebView:true,
						name : 'Student_PracticeRecordListCognitionDetail',
						url : 'Student_PracticeRecordListCognitionDetail.html',
						pageParam : {
							id : id,
							sxid : sxid
						}
					});
				} else {
					api.openWin({useWKWebView:true,
						name : 'Student_PracticeRecordListDetail',
						url : 'Student_PracticeRecordListDetail.html',
						pageParam : {
							id : id,
							sxid : sxid
						}
					});
				}
			});
		}
	</script>
</html>